import requests


def test_orm_submit():
    resp = requests.post(
        "http://127.0.0.1:8000/reqs/orm_submit",
        json={
            "quality": 5,
            "attitude": 2,
            "speed": 4,
            "text": "heheheh",
            "annoy": False,
        },
    )

    # print(resp.json())
    print(resp.text)
    assert resp.status_code == 200


# 创建数据的测试用例,每次执行会将数据写进去,第二次执行就报错了.
# def test_orm_create_sql_data():
#     resp = requests.post(
#         "http://127.0.0.1:8000/reqs/create_sql_data",
#         json={"s_id": "06", "c_id": "02", "s_score": 80},
#     )
#
#     # print(resp.json())
#     # print(resp.text)
#     assert resp.status_code == 200
